| Fully Qualified Name: | Laminas\Code\Generator\TraitGenerator | 
| Extends: | ClassGenerator | 
| Parameter Name | Type | Description | 
|---|---|---|
| $name | string | |
| $namespaceName | string | |
| $flags | array|string | |
| $extends | string | |
| $interfaces | array | |
| $properties | array | |
| $methods | array | |
| $docBlock | \DocBlockGenerator | 
Returns:
Add Constant
| Parameter Name | Type | Description | 
|---|---|---|
| $name | string | Non-empty | 
| $value | string|int|null|float|array | Scalar | 
Returns: self
Add constant from PropertyGenerator
| Parameter Name | Type | Description | 
|---|---|---|
| $constant | \PropertyGenerator | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $constants | \PropertyGenerator[]|array[] | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $flag | string | 
Returns: self
Add Method from scalars
| Parameter Name | Type | Description | 
|---|---|---|
| $name | string | |
| $parameters | array | |
| $flags | int | |
| $body | string | |
| $docBlock | string | 
Returns: self
Add Method from MethodGenerator
| Parameter Name | Type | Description | 
|---|---|---|
| $method | \MethodGenerator | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $methods | array | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $properties | array | 
Returns: self
Add Property from scalars
| Parameter Name | Type | Description | 
|---|---|---|
| $name | string | |
| $defaultValue | string|array | |
| $flags | int | 
Returns: self
Add property from PropertyGenerator
| Parameter Name | Type | Description | 
|---|---|---|
| $property | \PropertyGenerator | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $trait | 
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $method | ||
| $alias | ||
| $visibility | 
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $method | ||
| $traitsToReplace | 
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $traits | 
Returns:
Add a class to "use" classes
| Parameter Name | Type | Description | 
|---|---|---|
| $use | string | |
| $useAlias | string|null | 
Returns: self
Generate from array
| Parameter Name | Type | Description | 
|---|---|---|
| $array | array | 
Returns: \TraitGenerator
Build a Code Generation Php Object from a Class Reflection
| Parameter Name | Type | Description | 
|---|---|---|
| $classReflection | \ClassReflection | 
Returns: \TraitGenerator
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $constantName | string | 
Returns: \PropertyGenerator|bool
Returns: \PropertyGenerator[] indexed by constant name
Returns: \FileGenerator
Returns: \DocBlockGenerator
Returns: string
Returns: array
Returns: string
| Parameter Name | Type | Description | 
|---|---|---|
| $methodName | string | 
Returns: \MethodGenerator|bool
Returns: \MethodGenerator[]
Returns: string
Returns: string
Returns: \PropertyGenerator[]
| Parameter Name | Type | Description | 
|---|---|---|
| $propertyName | string | 
Returns: \PropertyGenerator|bool
Returns: string
Returns:
Returns:
Returns:
Returns the "use" classes
Returns: array
| Parameter Name | Type | Description | 
|---|---|---|
| $constantName | string | 
Returns: bool
Returns: bool
| Parameter Name | Type | Description | 
|---|---|---|
| $implementedInterface | string | 
Returns: bool
| Parameter Name | Type | Description | 
|---|---|---|
| $methodName | string | 
Returns: bool
| Parameter Name | Type | Description | 
|---|---|---|
| $propertyName | string | 
Returns: bool
| Parameter Name | Type | Description | 
|---|---|---|
| $traitName | 
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $use | string | 
Returns: bool
| Parameter Name | Type | Description | 
|---|---|---|
| $use | string | 
Returns: bool
Returns: bool
Returns: bool
Returns: bool
| Parameter Name | Type | Description | 
|---|---|---|
| $constantName | string | 
Returns: self
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $flag | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $implementedInterface | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $methodName | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $propertyName | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $traitName | 
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $method | ||
| $overridesToRemove | 
Returns:
| Parameter Name | Type | Description | 
|---|---|---|
| $use | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $use | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $isAbstract | bool | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $fileGenerator | \FileGenerator | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $docBlock | \DocBlockGenerator | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $extendedClass | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $isFinal | bool | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $flags | array|string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $implementedInterfaces | array | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $indentation | string | 
Returns: \AbstractGenerator
| Parameter Name | Type | Description | 
|---|---|---|
| $name | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $namespaceName | string | 
Returns: self
| Parameter Name | Type | Description | 
|---|---|---|
| $options | array|\Traversable | 
Returns: \AbstractGenerator
| Parameter Name | Type | Description | 
|---|---|---|
| $sourceContent | string | 
Returns: \AbstractGenerator
| Parameter Name | Type | Description | 
|---|---|---|
| $isSourceDirty | bool | 
Returns: \AbstractGenerator